<?php

/**
 * Classe Relatorio
 *
 * @author Falci
 * @package entidade
 */
class Relatorio {

    private $id;
    private $data;
    private $admin;

    public function setId($id){
        $this->id = $id;
    }

    public function getId(){
        return $this->id;
    }

    public function setData($data=NULL){
        if($data==NULL){
            $this->data = date("Y-m-d");

        } elseif(strpos($data, "/")){
            $d = explode("/",$data);
            $this->data = $d[2]."-".$d[1]."-".$d[0];

        } else {
            $this->data = $data;
        }
    }

    public function getData($br=false){
        if($br){
            $d = explode("-",$this->data);
            return $d[2]."/".$d[1]."/".$d[0];
        } else {
            return $this->data;
        }
    }

    public function setAdmin($admins){
        $this->admin = $admins;
    }

    public function getAdmin(){
        return $this->admin;
    }

}

?>
